﻿@model Domain.Entity.Platform
@{
    ViewBag.Title = "Edit -- " + Model.Name;
}

    <h2 class="title @Html.GetColor(Request.Cookies["color"])">Edit @Model.Name</h2>

<div id="titlelessItem">
    <div class="item">
        @using (Html.BeginForm("EditPlatform", "Platform", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.EditorForModel()

            @Html.HiddenFor(m => m.ImageMimeType)
            @Html.HiddenFor(m => m.ImageData)
            
            <div>Upload new image: <input type="file" name="Image" class="actionButtons @Html.GetColor(Request.Cookies["color"])" /></div>
        
            <input type="submit" value="Upload" class="actionButtons @Html.GetColor(Request.Cookies["color"])" />
            <img src="@Html.Action("GetImage", "Platform")" alt=""></img>
            <br />
            
            <div>Upload Video:</div><br /> 
            <input type="file" name="vidFile" class="actionButtons @Html.GetColor(Request.Cookies["color"])" /><br /><br />
            <div>Only .wmv and .swf files can be uploaded.</div><br />
            
            
            <div style="text-align: center">
                <input type="submit" value="Save" class="actionButtons" />
                @Html.ActionLink("Cancel", "AdminListings", null, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
            </div>
        }
    </div>
</div>
